function v = bivariate_svmh0(vlead,v0,W,ssr0,sss0);

% v = bivariate_svmh0(vlead,v0,W,ssr0,sss0);

% This file returns a draw from the posterior conditional density
% for the stochastic volatility parameter at time t.  This is conditional
% on adjacent realizations, vlead and vlag, as well as the data and parameters 
% of the svol process.  

% v_{t} = (r_{t},s{t})' is a geometric random walk with innovation variance W
% The prior on logv_0 is normal with mean log(v0) and variance [ssr0 0; 0 sss0];

Omega = W;
Omega0 = [ssr0 0; 0 sss0];
Omega1 = inv(inv(Omega0) + inv(Omega));
mu = Omega1*(inv(Omega0)*log(v0) + inv(Omega)*log(vlead));
[V,D] = eig(Omega1);
Omega1_sqrt = real(V*(D.^.5)*V');
%v = exp(mu + sqrtm(Omega1)*randn(2,1)); % draw from lognormal (accept = 1, since there is no observation)
v = exp(mu + Omega1_sqrt*randn(2,1)); % draw from lognormal (accept = 1, since there is no observation)
end

